from ..models.account_history import AccountHistory
from ..models.account import Account


class AccountService(object):

    @classmethod
    def get_account_by_id(cls, account_id):
        return Account.query.filter(Account.id == account_id)

    @classmethod
    def get_account_his_by_id(cls, account_id,  pagination=None):
        query = AccountHistory.query.filter(AccountHistory.account_id == account_id).\
            filter(AccountHistory.status == 'done')
        return query.all(), None
